﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _95合并数组
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] array0 = { 7, 8, 9 };
            int[] array1 = { 8, 4, 6, 1, 9, 3, 4 };
            //创建新的数组
            int[] array2 = new int[array0.Length + array1.Length];

            for (int i = 0; i < array2.Length; i++)
            {
                if (i < array0.Length)
                {
                    array2[i] = array0[i];
                }
                else //i: 3
                {
                    array2[i] = array1[i - array0.Length];
                }
            }
            //输出合并后的数组
            foreach (var item in array2)
            {
                Console.WriteLine(item);
            }
        }
    }
}